package cn.iocoder.yudao.module.trade.enums.delivery;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 配送方式枚举
 *
 * @author 芋道源码
 */
@Getter
@AllArgsConstructor
public enum DeliveryModelEnum implements IntArrayValuable {
    //发货模式，1-统一发货 2-分拆发货
    UNIFICATION(1, "统一发货"),
    split(2, "分拆发货"),
    split_qty(3, "数量分拆发货");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryModelEnum::getType).toArray();

    private final Integer type;
    /**
     * 状态名
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
